package com.verisette.ncos.service.approver.bizunit;

import java.util.List;

import org.apache.log4j.Logger;
import org.corp.agi.common.bean.LabelValueBean;
import org.corp.agi.common.constant.CommonConstant;
import org.corp.agi.common.exception.ProcessException;
import org.corp.agi.service.bean.ProcessContext;
import org.corp.agi.service.bizunit.CommonBusinessUnit;

import com.verisette.ncos.persistence.domain.CustomCustomerOrder;
import com.verisette.ncos.persistence.domain.TransCustomerOrder;

public class GetTransCustomerOrderBU extends CommonBusinessUnit{

	private Logger LOG = Logger.getLogger(GetTransCustomerOrderBU.class);
	@SuppressWarnings("unchecked")
	@Override
	public void execute(ProcessContext p) throws ProcessException 
	{
		if(LOG.isDebugEnabled())
		{
			LOG.debug("Processing GetCustomerOrderByIdBU...");
		}
		TransCustomerOrder order = (TransCustomerOrder) p.getValueObject();
		TransCustomerOrder resultOrder = (TransCustomerOrder) commonDAO.findById(TransCustomerOrder.class, order.getOrderId());
		p.setValueObject(resultOrder);
		p.setStatus(CommonConstant.SERVICE_STATUS_SUCCESS);
	}

}
